<template>
  <view class="order-info">
    <view class="order-banner">
      <view class="order-banner-info">
        <view class="order-banner-icon">
          <image src="../../static/images/lendIcon.png" mode=""></image>
        </view>
        <view class="order-banner-title">
          <li class="lend-state">租借中</li>
          <li class="lend-explain">每位用户限借1台，归还可直接插入空位！</li>
        </view>
      </view>
    </view>
    <view class="order-container">
      <view class="order-time">
        <view class="order-time-detail">
          <text>36分钟</text>
          <text class="time">使用时长</text>
        </view>
        <view class="order-time-detail">
          <text>2元</text>
          <text class="time">预估金额</text>
        </view>
      </view>
      <view class="order-price-detail">
        <text class="price-detail">价格明细</text>
        <view class="order-lend-price">
          <text class="orderPrice">订单金额</text>
          <text class="prices">￥2.00</text>
        </view>
        <view class="order-lend-rules">
          计费规则：3分钟以内归还免费， 2元/30分钟， 28元/24小时，总封顶99元!
        </view>
      </view>
      <view class="order-lend-detail">
        <text class="lend-info">租借信息</text>
        <ul>
          <li>
            <text>订单号</text>
            <text>{{ orderNum }}</text>
          </li>
          <li>
            <text>租借地点</text>
            <text>门店名称展示</text>
          </li>
          <li>
            <text>租借时间</text>
            <text>2023-11-06  11:20:30</text>
          </li>
          <li>
            <text>归还地点</text>
            <text>--</text>
          </li>
          <li>
            <text>归还时间</text>
            <text>--</text>
          </li>
          <li>
            <text>充电宝SN</text>
            <text>{{powerBankId}}</text>
          </li>
        </ul>
      </view>
      <view class="order-btn">
        <van-button color="linear-gradient(#0366E0, #1E50DC)" type="info">不想还了，留下充电宝</van-button>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        orderNum: '15589632447862', // 订单号
        powerBankId: 'A22544522110124' // 充电宝序列号
      }
    }
  }
</script>

<style lang="less" scoped>
  .order-info {
    .order-banner {
      display: flex;
      align-items: center;
      width: 100%;
      height: 90px;
      background: url(../../static/images/orderBanner.png) 0 0 no-repeat;
      background-size: cover;
      
      .order-banner-info {
        display: flex;
        align-items: center;
        margin-left: 15px;
        margin-top: -8px;
        
        .order-banner-icon {
          width: 40px;
          height: 40px;
          
          image {
            width: 100%;
            height: 100%;
            object-fit: contain;
          }
        }
        
        .order-banner-title {
          margin-left: 10px;
          color: #FFFFFF;
          
          .lend-state {
            font-family: 'PingFang-SC-Bold', sans-serif;
            font-size: 16px;
            margin-bottom: 5px;
          }
          .lend-explain {
            font-size: 12px;
          }
        }
      }
    }
    .order-container {
      position: relative;
      top: 0;
      background-color: #fff;
      border-radius: 8px;
      margin: 0 12px;
      padding: 0 12px;
      .order-time {
        margin-top: -16px;
        display: flex;
        justify-content: space-between;
        
        .order-time-detail {
          display: flex;
          flex: 1;
          flex-direction: column;
          align-items: center;
          padding: 20px 0;
        }
        .time {
          font-size: 12px;
          color: #666666;
          margin-top: 5px;
        }
      }
      .order-price-detail {
        .price-detail {
          color: #333333;
          font-size: 16px;
        }
        .order-lend-price {
          margin-top: 14px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          
          .orderPrice {
            font-size: 14px;
            color: #666666;
          }
          .prices {
            font-size: 22px;
            color: #222222;
          }
        }
        .order-lend-rules {
          font-family: 'PingFang-SC-Regular', sans-serif;
          font-size: 13px;
          line-height: 25px;
          color: #666666;
          margin: 22px 0 0 10px;
        }
      }
      .order-lend-detail {
        margin-top: 55px;
        .lend-info {
          color: #333333;
          font-size: 16px;
        }
        ul {
          margin-top: 20px;
        }
        li {
          display: flex;
          justify-content: space-between;
          padding-bottom: 20px;
          font-size: 14px;
          color: #666666;
          font-family: 'PingFang-SC-Regular', sans-serif;
        }
      }
      .order-btn {
        position: relative;
        top: 20px;
        padding-bottom: 20px;
        
        ::v-deep .van-button {
          width: 100%;
          height: 42px;
          font-size: 16px;
        }
        ::v-deep .van-button--normal {
          border-radius: 10px;
        }
      }
    }
  }
</style>
